<?php
require("../e/class/connect.php");
require("../e/class/db_sql.php");
require("../e/data/dbcache/class.php"); //引入栏目缓存文件
require("../e/member/class/user.php");
require("../e/data/dbcache/MemberLevel.php");
include("../e/extend/wechat/wechat.config.php");
require("../e/extend/wechat/wechat.class.php");
require("../e/extend/wechat/wechat.fun.php");

$link=db_connect();                //连接MYSQL
$empire=new mysqlquery();        //声明数据库操作类


//检测登录状态
$user=qCheckLoginAuthstr();
if(!$user['islogin']) oatuh2Login();
$userid = $user['userid'];
$openid = $user['username'];
//$adduser=$empire->fetch1("select userfen from {$dbtbpre}enewsmember where userid='$userid' limit 1");
//$userfen=(int)$adduser['userfen'];
// 微信类
$WeiXin  = new Wechat($options);

//导入模板
$ac=RepPostVar($_POST['ac']);
if(empty($ac))
{$ac=RepPostVar($_GET['ac']);}
$tempPath = ECMS_PATH.'webapp/temp/';
$header   = $tempPath.'header.php';
$footer   = $tempPath.'footer.php';
$tempfile = $tempPath.$ac.'.php';
if(!file_exists($tempfile))
{
	$ac='index';
	$tempfile = $tempPath.$ac.'.php';
}
//导入模板
require($tempfile);

db_close();
$empire=null;
exit;